from django.shortcuts import render
from django.http import HttpResponse
from .models import News
def index_view(request):
    # 查询所有的新闻
    news = News.objects.all()
    return render(request, 'news/index.html', locals())